<extend name="./Common/View/Public/form.html" />
<block name="page_title">编辑身份</block>
<block name="main">
    <form class="layui-form" method="post" action="sys/identity/update" lay-filter="pageForm">
        <input type="hidden" name="id" value="{$data.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">身份代码</label>
            <div class="layui-input-inline">
                <input type="text" name="code" value="{$data.code}" readonly maxlength="30" minlength="1" lay-verify="required|length" placeholder="请输入身份代码" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">1-20个英文或数字</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色名称</label>
            <div class="layui-input-inline">
                <input type="text" name="title" value="{$data.title}" maxlength="30" minlength="1" lay-verify="required|length" placeholder="请输入身份名称" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">1-6个英文或汉字</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">默认角色</label>
            <div class="layui-input-block">
                <select name="role_id" id="role_id" lay-filter="role_id" value="{$data.role_id}" api="sys/role/slist?status=1" empty="请选择">
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份状态</label>
            <div class="layui-input-block">
                {:W('Todo/Dict/radio',array('STATUS','status',$data['status']))}
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">身份说明</label>
            <div class="layui-input-block">
                <textarea name="remark" class="layui-textarea">{$data.remark}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="pageForm">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</block>